<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>消费凭证</title>	
		{literal}
		<style>
		body{border:0;padding:0; margin:0;}
			div,th,td,p,span,a{font-size:12px;}
			.integral_info{width:360px; border:1px solid #E5E5E5; padding:20px;}
			.integral_info table{width:80%; text-align:left;}
			.integral_info th{font-weight:bold; height:30px;}
			.integral_info span{font-weight:normal;}
			.integral_warning{border:1px solid red; margin:20px 0 0; height:35px;background-color:#FEF9D1; padding:10px 20px 0}
			table,th{text-align: left; margin:0; padding:0; border-collapse:collapse; border-spacing:0;}
			th{height:24px;}
		</style>
		{/literal}
	</head>
	<body>
<table align="left">
	<tr>
		<th>商户：<span>{$shopName}</span></th>
	</tr>
	<tr>
		<th>交易时间：<span>{$icInfo.cost_time}</span></th>
	</tr>
	<tr>
		<th>业主卡号：<span>{$ownerInfo.supplementary_card}</span></th>
	</tr>
	<tr>
		<th>业主姓名：<span>{$ownerInfo.owner_name}</span></th>
	</tr>
	<tr>
		<th>业主社区：<span>{$ownerInfo.province}{$ownerInfo.city}{$ownerInfo.community_name}</span></th>
	</tr>
	<tr>
		<th>促销类型：<span>{if $icInfo.discount_type eq 1}送积分{else}{$icInfo.discount_num}折{/if}</span></th>
	</tr>
	<tr>
		<th>消费状态：<span>正常</span></th>
	</tr>
	<tr>
		<th>原卡内剩余积分：<span>{$icInfo.cost_shop_before_money}</span></th>
	</tr>
	<tr>
		<th>本次{if $type eq 1}增加{else}扣减{/if}积分：<span>{$icInfo.cost_money}</span></th>
	</tr>
	<tr>
		{if $type eq 1}
		<th>本次{if $icInfo.discount_type eq 1}赠送积分{else}折扣率{/if}：<span>{$icInfo.discount_num}</span></th>
		{else}
			{if $icInfo.discount_type eq 2}
			<th>本次折扣率：<span>{$icInfo.discount_num}</span></th>
			{/if}
		{/if}
	</tr>
	<tr>
		<th>本次实际{if $type eq 1}增加{else}扣减{/if}积分：<span>{$icInfo.cost_money_t}</span></th>
	</tr>
	<tr>
		<th>本次{if $type eq 1}增加{else}扣减{/if}后剩余积分：<span>{$icInfo.cost_shop_after_money}</span></th>
	</tr>
</table>
<script> 
{literal}
function doPrint() {

	/// 隐藏不需要打印的内容
	    try
	    {
	        PageSetup_Null();
	    }
	    catch(e)
	    {
	        var errorMsg = e.message+"\r"+"请设置:IE选项->安全->Internet->"+"ActiveX控件和插件"+"\r"+"对未标记为可安全执行脚本的ActiveX的控件初始化并执行脚本->允许/提示";
	        //alert(errorMsg);
	        //return;
	    }
	    window.print();
	    window.close();
	}

	var HKEY_Root,HKEY_Path,HKEY_Key;
	HKEY_Root="HKEY_CURRENT_USER";
	HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
	//设置网页打印的页眉页脚为空
	function PageSetup_Null()
	{
	      var Wsh=new ActiveXObject("WScript.Shell");
	      HKEY_Key="header";
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
	      HKEY_Key="footer";
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
	      HKEY_Key="margin_left"
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.2"); //键值设定--左边边界

	      HKEY_Key="margin_top"
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--上边边界

	      HKEY_Key="margin_right"
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.2"); //键值设定--右边边界

	      HKEY_Key="margin_bottom"
	      Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--下边边界
	}

	doPrint();
	{/literal}	            
</script>
</body>
</html>
